import Login from '@/views/login/index'
import Layout from '@/layout'
import Dashboard from '@/views/dashboard/index'
import User from '@/views/system/user/index'
import Department from '@/views/system/department/index'
import Role from '@/views/system/role/index'
import Menu from '@/views/system/menu/index'
import TestPage from '@/views/testPage/index'

/**
 * Note: sub-menu only appear when route children.length >= 1
 * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
 *
 * hidden: true                   if set true, item will not show in the sidebar(default is false)
 * alwaysShow: true               if set true, will always show the root menu
 *                                if not set alwaysShow, when item has more than one children route,
 *                                it will becomes nested mode, otherwise not show the root menu
 * redirect: noRedirect           if set noRedirect will no redirect in the breadcrumb
 * name:'router-name'             the name is used by <keep-alive> (must set!!!)
 * meta : {
    title: 'title'               the name show in sidebar and breadcrumb (recommend set)
    icon: 'svg-name'/'el-icon-x' the icon show in the sidebar
    breadcrumb: false            if set false, the item will hidden in breadcrumb(default is true)
    activeMenu: '/example/list'  if set path, the sidebar will highlight the path you set
	id:'1'						路由id后段提供，固定路由不需要id
  }
 */


/**
 * 固定路由信息
 */
export const constantRoutes = [{
		path: '/login',
		component: Login,
		hidden: true
	},
	{
		path: '/',
		component: Layout,
		redirect: '/dashboard',
		children: [{
			path: 'dashboard',
			name: 'Dashboard',
			component: Dashboard,
			meta: {
				title: '首页',
				icon: 'el-icon-s-home',
				affix: true
			}
		}]
	}
]

/**
 * 动态路由信息
 */
export const asyncRouterInfo = [{
	path: '/system',
	component: Layout,
	redirect: '/system/user',
	name: 'System',
	meta: {
		title: '系统管理',
		icon: 'el-icon-setting',
		id: '1251765692693352448'
	},
	children: [{
			path: '/system/user',
			name: 'User',
			component: User,
			meta: {
				title: '用户管理',
				icon: 'el-icon-user-solid',
				id: '1251766029634375680'

			}
		},
		{
			path: '/system/department',
			component: Department,
			name: 'Department',
			meta: {
				title: '部门管理',
				icon: 'el-icon-s-order',
				id: '1251765981710258176'
			}
		},
		{
			path: '/system/role',
			component: Role,
			name: 'Role',
			meta: {
				title: '角色管理',
				icon: 'el-icon-s-check',
				id: '1251766060286349312'
			}
		},
		{
			path: '/system/menu',
			component: Menu,
			name: 'Menu',
			meta: {
				title: '菜单管理',
				icon: 'el-icon-menu',
				id: '1251765945224007680'
			}
		}
	]
}]
